/*
 * Copyright (c) zhg2yqq.com Corp.
 * All Rights Reserved.
 */
package com.zhg2yqq.wheels.mvc.wrapper;

import java.lang.reflect.Field;

import com.zhg2yqq.wheels.mvc.annotation.FieldEncrypt;

import cn.hutool.core.util.ReflectUtil;

/**
 * @author zhg2yqq, 2022年12月6日
 * @version zhg2yqq v1.0
 */
public interface BaseWapper<T> {
    default Field[] getGenericTypeAllEncryptFields() {
        Class<T> type = getGenericType();
        return ReflectUtil.getFields(type, f -> f.isAnnotationPresent(FieldEncrypt.class));
    }

    Class<T> getGenericType();
}
